package model;

import java.awt.Component;
import java.awt.Container;

import javax.swing.JLabel;

import view.themas.Thema;

public class Presentatie extends PresenteerbareCollectie {

	@Override
	public void setThema(Thema thema) {
		setChanged();
		super.setThema(thema);
		notifyObservers();
	}
	
	@Override
	public Component toon() {
		Container result = (Container)getItems().get(currentItem).toon();
		for (Component item : result.getComponents())
		{
			if (item.getName() == "slideNummer")
			{
				JLabel label = (JLabel)item;
				label.setText(String.valueOf(currentItem + 1));
			}
		}
		return result;
	}

}
